package inc.gome.dynamic.datasource.mapper;


import inc.gome.dynamic.datasource.entity.RestUser;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Component;


/*从数据源*/
@Mapper
@Component
public interface SlaveMapper {

    @Select("select * from  rest_user where id = #{id}")
    public RestUser findById(@Param("id") Integer  id);


    @Update("update  rest_user set username =#{name} where id =#{id}")
    void updateById(@Param("id")Integer id, @Param("name")String name);
}
